<!DOCTYPE html>
<html>
	<head>
		<meta charset="UTF-8">
		<title></title>
	</head>
	<body>
		<script type="text/javascript">
			//创建数组
			var arr1=[1,2,3,4,5,6];
			var arr2=[8,10,12,14,16];
			
			//判断数组是否全由偶数组成
			//some:类似于|| 只有要一个满足就为true
			//结果为boolean
			var bool1=arr1.some(function(val,i,arr){
				return val%2==0;
			});
			
			//类似于&& 只有全部都为true，才为true
			var bool2=arr2.every(function(val,i,arr){
				return val%2==0;
			});
			
			console.log(bool1);
			console.log(bool2);
		</script>
	</body>
</html>
